Release 10.1A: OpenEdge Data Management:
SQL Reference


SUBSTR

Returns the substring of the character string corresponding to the first argument starting at start_pos and length characters long. If the third argument length is not specified, the substring starting at start_pos up to the end of char_expression is returned.

Syntax

SUBSTR ( char_expression, start_pos [ , length ] ) 

Example

This example illustrates the SUBSTR function:

SELECT last_name, '(', SUBSTR (phone, 1, 3) , ')', 
          SUBSTR (phone, 4, 3), '-',  
          SUBSTR (phone, 7, 4) 
  FROM customer ; 

Notes

Compatibility

Progress extension


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095